using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace PeDALS.Tools.AZ.PSTArchive.PSTData
{
    public class SLEntry
    {
        private UInt64 m64NIDraw;
        private UInt64 m64BIDrawData;
        private UInt64 m64BIDrawSub;

        public SLEntry(UInt64 ui64NIDraw, UInt64 ui64BIDrawData, UInt64 ui64BIDrawSub)
        {
            m64NIDraw = ui64NIDraw;
            m64BIDrawData = ui64BIDrawData;
            m64BIDrawSub = ui64BIDrawSub;
        }

        public UInt64 NIDraw
        {
            get { return m64NIDraw; }
        }

        public UInt64 NID
        {
            get { return m64NIDraw >> 5; }
        }

        public NIDTypes NIDType
        {
            get { return (NIDTypes)(m64NIDraw & 0x1f); }
        }

        public UInt64 BIDrawData
        {
            get { return m64BIDrawData; }
        }

        public UInt64 BIDData
        {
            get { return m64BIDrawData >> 2; }
        }

        public bool ReservedData
        {
            get { return Convert.ToBoolean(m64BIDrawData & 0x1); }
        }

        public bool InternalData
        {
            get { return Convert.ToBoolean((m64BIDrawData & 0x2) >> 1); }
        }

        public UInt64 BIDrawSub
        {
            get { return m64BIDrawSub; }
        }

        public UInt64 BIDSub
        {
            get { return m64BIDrawSub >> 2; }
        }

        public bool ReservedSub
        {
            get { return Convert.ToBoolean(m64BIDrawSub & 0x1); }
        }

        public bool InternalSub
        {
            get { return Convert.ToBoolean((m64BIDrawSub & 0x2) >> 1); }
        }
    }
}
